package com.sinog.biz.service.business.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sinog.biz.mapper.havexml.DepartmentMapper;
import com.sinog.biz.mapper.havexml.PrisonerXjxxMapper;
import com.sinog.biz.service.business.PrisonerXjxxService;
import com.sinog.core.domain.PrisonerXjxx;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @desc 衔接信息实现类
 * @author 潘志成
 * @date 2022/8/2 18:12
 */
@Service
public class PrisonerXjxxServiceImpl extends ServiceImpl<PrisonerXjxxMapper,PrisonerXjxx> implements PrisonerXjxxService {

    @Autowired
    private PrisonerXjxxMapper prisonerXjxxMapper;
    @Autowired
    private DepartmentMapper departmentMapper;

    /**
     * 通过罪犯编号查询送回方式
     * @param priNum priNum
     * @return String
     */
    @Override
    public String selectShfsByPriNum(String priNum) {
        return prisonerXjxxMapper.selectShfsByPriNum(priNum);
    }

    /**
     * 根据罪犯编号查找服刑单位level--衔接失败--监狱管理局上报和司法厅处理使用
     * @param priNum 服刑人员编号
     * @return 服刑单位level
     */
    @Override
    public String selectPdanweiLevelByPriNum(String priNum) {
        return departmentMapper.selectPdanweiLevelByPriNum(priNum);
    }
}